﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
namespace DAL
{
    public class NhanVienDAL
    {
        KetNoi kn=new KetNoi();
        public DataTable LietKeNhanVien(string tendangnhap, string matkhau)
        {
            SqlCommand cmd=new SqlCommand();
            DataTable dt=new DataTable();
            string query="select * from nhanvien where UserName=@tendangnhap and Password=@matkhau";
            cmd.CommandText=query;
            cmd.Parameters.Add("@tendangnhap", SqlDbType.VarChar);
            cmd.Parameters.Add("@matkhau", SqlDbType.VarChar);
            cmd.Parameters[0].Value = tendangnhap;
            cmd.Parameters[1].Value = matkhau;
            dt=kn.ExecuteQuery(cmd);
            return dt;
        }
    }
}
